#include "main.h"
#include "bsp_freertos.h"

static char tx_buf[256] = {0};
void debug_printf(const char* format, ...){
	va_list ap;
	int len;
	va_start(ap, format);
  len = vsnprintf(tx_buf, sizeof(tx_buf), format, ap);
  va_end(ap);
	for(int i=0;i<len;i++){
		SEGGER_RTT_printf(0,"%c",tx_buf[i]);
	}
}

int main(void){
	bsp_system_clock_config();
	task_init();
	vTaskStartScheduler();
	while(1){
//		debug_printf("GIT_USER = %s\r\nGIT_COMMIT_ID = %s\r\nGIT_COMMIT_TIME = %s\r\nCOMPILE_TIME = %s\r\n",GIT_USER,GIT_COMMIT_ID,GIT_COMMIT_TIME,COMPILE_TIME);
		delay_ms(1000);
	}
	return 0;
}
